package com.carlwang.util;

import org.junit.Test;

import jxl.Cell;
import jxl.Sheet;

public class ReadCell2PDF {

	public void convert(String pExcelPath, String mPdfPath) {
		ReadExcel mExcel = new ReadExcel();
		Sheet[] sheet = mExcel.readExcel(pExcelPath);
		for (int i = 0; i <sheet.length; i++) {
			int colums = sheet[i].getColumns();
			int rows = sheet[i].getRows();
			for (int c = 0; c < colums; c++) {
				for (int r = 0; r < rows; r++) {
					Cell cell = sheet[i].getCell(r, c);
					System.out.println(cell.getContents());
					
				}
			}
		}
	}
	@Test
	public void testConvert()
	{
		convert("d:\\test.xls","d:\\test.pdf");
	}
}
